document.getElementById('loginForm').addEventListener('submit', function(e) {
    e.preventDefault();
    
    const username = document.getElementById('username').value;
    const password = document.getElementById('password').value;

    // 验证用户名和密码
    if (username === "admin" && password === "admin") {
        // 直接跳转到首页，不显示提示
        window.location.href = "index.html";
    } else {
        alert("用户名或密码错误！");
    }
}); 